﻿@using DormMS.Model.Enum

@{
    Layout = null;
}

<style>
    .f_waitReceive {color: #ff4848;font-size: 15px;}
    .f_Receiveed {color: #444444;font-size: 15px;}
    .w_myCash_left p {color: #444444;font-size: 13px;}
    .wh_myCash_right{float:right;width:50%;}
    .wh_myCash_right div{
            font-size: 15px;
    color: #ff4848;
    text-align: right;
    margin-bottom: 2px;
    }
    .wh_myCash_right p{    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align:right;
    }

</style>

<div class="w_myCash" ng-controller="RecordListCtrl">
    <div class="w_excrecord_main w_mybal_main">
        <div class="w_myCash_per" ng-repeat="item in List" ng-show="List.length>0">
            <div class="w_myCash_left">
                <div>{{item.DrawRewardName}}</div>
                <p>{{item.ConsumePoints}}积分</p>
            </div>
            <div class="w_myCash_right f_Receiveed" ng-show="item.StepType==@((int)StepType.已发放)">已发放</div>
            <div class="wh_myCash_right" ng-show="item.StepType==@((int)StepType.待发放)">
                <div>待发放</div>
                <p>{{item.Address}}</p>
            </div>
            @*<div class="w_myCash_right f_waitReceive" ng-show="item.StepType==@((int)StepType.待发放)">待发放</div>*@
            <div class="w_myCash_right f_waitReceive" ng-click="setAddress(item.Id)" ng-show="item.StepType==@((int)StepType.待确认收货地址)">点击设置收货地址</div>
        </div>
        <div class="w_myCash_per" ng-show="List.length<=0">
            <div class="w_myCash_left">
                <div>暂无中奖纪录</div>
            </div>
        </div>
    </div>
</div>
<script>
    App.controller('RecordListCtrl', [
    '$scope', '$state', '$route', '$rootScope', '$http', "$stateParams",
        function ($scope, $state, $route, $rootScope, $http, $stateParams) {
            $scope.List = [];
            layer.load(2);
            $http.post("/Draw/GetRecordList").then(function (response) {
                layer.closeAll('loading');
                if (response.data.isSuccess) {
                    $scope.List = response.data.data;
                }
                else {
                    layer.msg(response.data.msg);
                }
            });

            //设置收货地址
            $scope.setAddress = function (id) {
                //alert(id);
                $state.go('draw.setAddress', { Id: id });
            }
            var tt = function () {
                $rootScope.WxShare($rootScope.pageTitle(), '优品三悦', location.href, $rootScope.LogoUrl);
            }

            setTimeout(tt, 1000)
        }
    ]);
</script>





    
   



